#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Enemy.generated.h"

class UNiagaraSystem;
class UDamageComponent;

UCLASS()
class AEnemy : public ACharacter
{
	GENERATED_BODY()

public:
	AEnemy();

	virtual void BeginPlay() override;

	virtual void Tick(float DeltaTime) override;

	void PlayAttackSound();

	void PlayAttackEffect();

protected:
	float Counter = 0;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "通用组件", DisplayName = "伤害组件")
	TObjectPtr<UDamageComponent> DamageComponent;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "通用组件", DisplayName = "伤害音效")
	TObjectPtr<USoundBase> AttackSound;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "通用组件", DisplayName = "伤害特效")
	TObjectPtr<UNiagaraSystem> AttackEffect;
};
